package cn.apiManager.dao.impl;

import cn.apiManager.dao.UserInfoDao;
import cn.apiManager.entity.UserInfo;

import org.beetl.sql.core.SQLManager;
import org.beetl.sql.core.db.Page;
import org.beetl.sql.ext.spring.SpringBeetlSql;
import org.springframework.stereotype.Repository;

import java.util.List;

import javax.annotation.Resource;

/**
 * 用户信息 接口类实现类
 **/
@Repository
public class UserInfoDaoImpl implements UserInfoDao {
	@Resource
	private SpringBeetlSql beetlsql;

	@Override
	public int deleteByExample(UserInfo example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public boolean delete(List<Long> ids) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public int insert(UserInfo record) {
		SQLManager dao = beetlsql.getSQLMananger();
		return dao.insert(record);
	}

	@Override
	public int insertSelective(UserInfo record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<UserInfo> selectByExampleList(UserInfo example) {
		SQLManager dao = beetlsql.getSQLMananger();
		return dao.template(example);
	}

	@Override
	public Page<UserInfo> selectByExamplePage(UserInfo example) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public UserInfo selectByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int updateByPrimaryKeySelective(UserInfo record) {
		SQLManager dao = beetlsql.getSQLMananger();
		dao.update("userInfo.updateUserStatus", record);
		return 0;
	}

	@Override
	public int updateByPrimaryKey(UserInfo record) {
		// TODO Auto-generated method stub
		return 0;
	}

}
